import 'package:flutter/material.dart';

class AppPushButton extends StatelessWidget {
  final String text;
  final Widget page;

  const AppPushButton(this.text, this.page, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return OutlinedButton(
      onPressed: () {
        Navigator.push(
          context,
          MaterialPageRoute(
            builder: (BuildContext context) {
              return page;
            },
          ),
        );
      },
      child: Text(text),
    );
  }
}
